package com.friend.entity.entity.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author friend
 * @since 2019-10-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_member")
@ApiModel(value="Member对象", description="")
public class Member extends Model<Member> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "昵称")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty(value = "姓名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "小程序id")
    @TableField("mp_wx_open_id")
    private String mpWxOpenId;

    @ApiModelProperty(value = "qq appid")
    @TableField("app_qq_open_id")
    private String appQqOpenId;

    @ApiModelProperty(value = "wx appid")
    @TableField("app_wx_open_id")
    private String appWxOpenId;

    @ApiModelProperty(value = "微博 uid")
    @TableField("app_weibo_uid")
    private Integer appWeiboUid;

    @ApiModelProperty(value = "性别")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty(value = "生日")
    @TableField("birthday")
    private LocalDate birthday;

    @ApiModelProperty(value = "头像")
    @TableField("face_image")
    private String faceImage;

    @ApiModelProperty(value = "学历")
    @TableField("education")
    private Integer education;

    @ApiModelProperty(value = "地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "是否认证")
    @TableField("is_certified")
    private Integer isCertified;

    @ApiModelProperty(value = "注册时间")
    @TableField("regist_time")
    private LocalDateTime registTime;

    @ApiModelProperty(value = "用户唯一token")
    @TableField("user_unique_token")
    private String userUniqueToken;

    @ApiModelProperty(value = "删除标识")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "项目环境判断标识")
    @TableField(exist = false)
    private Integer whichMP;

    @ApiModelProperty(value = "爱好")
    @TableField(value = "honors")
    private String honors;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
